Skip to content

[#323] Remove lib/viem.ts re-export shim#324

Merged
realproject7 merged 1 commit intomainfrom
task/323-remove-viem-shim
Mar 18, 2026
Merged

[#323] Remove lib/viem.ts re-export shim#324
realproject7 merged 1 commit intomainfrom
task/323-remove-viem-shim

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Updated 3 files (lib/price.ts, lib/contracts/erc8004.ts, src/app/api/cron/backfill/route.ts) to import publicClient from lib/rpc instead of lib/viem
  • Deleted lib/viem.ts (1-line re-export shim flagged in audit [Pre-Mainnet] Contract integration audit checklist #320, items F1/F5)
  • npm run build passes

Fixes #323

Test plan

  • npm run build passes
  • Verify backfill cron still works (uses publicClient from lib/rpc)

Update all imports of publicClient from lib/viem to lib/rpc,
then delete the unnecessary shim file.

Fixes #323

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

This PR removes the lib/viem.ts shim and updates all remaining imports to use lib/rpc directly. The change is minimal, consistent, and satisfies the queue item intent.

Findings

  • [low] Issue #323 understated current usage; lib/price.ts and lib/contracts/erc8004.ts also imported the shim, and this PR correctly updates them too.
    • File: lib/price.ts:2
    • Suggestion: None; this is the right scope.
  • [low] No remaining code imports of lib/viem remain after this patch.
    • File: src/app/api/cron/backfill/route.ts:3
    • Suggestion: None.

Decision

Approve. lib/viem.ts is deleted, imports now point at lib/rpc, and local npm run build passes.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T2b APPROVE

Clean, minimal change. Verified:

  • All 3 imports (lib/price.ts, lib/contracts/erc8004.ts, src/app/api/cron/backfill/route.ts) updated from lib/viemlib/rpc
  • lib/viem.ts deleted (confirmed 404 on PR branch)
  • No remaining references to lib/viem in the codebase
  • Single commit, correctly scoped to #323

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[#320] Remove lib/viem.ts re-export shim

2 participants